package com.cn.web.role.vo;

import com.cn.common.IDGenerate;
import com.cn.empty.EmptyCheck;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * description: RoleEditDTO <br>
 * date: 21.12.16 10:43 <br>
 * author: cn_yaojin <br>
 * version: 1.0 <br>
 */
@Setter
@Getter
@ToString
@Accessors(chain = true)
@ApiModel(value = "角色编辑")
public class RoleEditDTO extends IDGenerate {

    @EmptyCheck(message = "角色名称不能为空")
    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "角色描述")
    private String roleDesc;

    @ApiModelProperty(value = "0-启用 1-禁用")
    private String status = "0";

    @ApiModelProperty(value = "是否子系统管理员，0-是 1-否")
    private Integer adminFlag = 1;

    @ApiModelProperty(value = "菜单编号集")
    private List<MenuArray> menuNo;

    @ApiModelProperty(value = "数据权限 0-全部数据 1-所在部门数据 2-本人的数据")
    private String dataType;

    @ApiModelProperty(value = "添加人（系统自动处理）")
    private String addName;

    @ApiModelProperty(value = "添加时间")
    private String addTime;


    @Setter
    @Getter
    @Accessors(chain = true)
    @ApiModel(value = "菜单-按钮集")
    public static class MenuArray {
        @ApiModelProperty(value = "菜单编号")
        private String menuNo;

        @ApiModelProperty(value = "按钮")
        private List<String> buttons;
    }
}
